//
//  main.m
//  runtime
//
//  Created by apple on 2022/1/3.
//

#import "Person.h"
#import <Foundation/Foundation.h>
//#import "objc-object.h"

OBJC_EXPORT void
_objc_autoreleasePoolPrint(void)
    OBJC_AVAILABLE(10.7, 5.0, 9.0, 1.0, 2.0);

void testAutoReleasePool(){
    
    @autoreleasepool {
        for (int i=0; i<505; i++) {
            Person * p =[[Person alloc]init];
        }
        
    };
    _objc_autoreleasePoolPrint();
}


int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSString * a =[NSString stringWithFormat:@"abc"];
        NSLog(@"a---%p",a);
        NSNumber * number1 =@1;
        NSLog(@"number1---%p",number1);
        
        testAutoReleasePool();
        
        NSObject * object =[ NSObject alloc];
        Person * p = [[Person alloc]init];
        NSDate * date = [[NSDate alloc]init];
        NSLog(@"date---%p",date);
//       NSLog(@"%d", _objc_isTaggedPointer((__bridge void *)date));
        NSLog(@"Hello, World!");
    }
    return 0;
}
